import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.kun.service_train.entity.Train;
import com.kun.service_train.service.TrainService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class test {
    @Autowired
    private TrainService trainService;
    @Test
    public void aaa() throws ParseException {
        Date beginDate = new Date();
        System.out.println(beginDate);
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String endTime=new String("2022-05-08 11:22:22");

        Date end = df.parse(endTime);

        System.out.println(beginDate.before(end));
//        String
//
//        String endTime=new String("2017-05-08 11:22:22");
//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//
//        Date sd1=df.parse(beginTime);
//        Date sd2=df.parse(endTime);
//
//        System.out.println(sd1.before(sd2));
//        System.out.println(sd1.after(sd2));
    }
}
